import axios from 'axios';
import service from '../request/';

const controller = "DictType"

/**
* 
分页
* @param {*} data 
* @returns 
*/
function query(data: any) {
    return service({
        method: 'get',
        url: controller + '/query',
        params: data,
    })
}

/**
* 查找单个
* @param {*} data 
* @returns 
*/
function get(data: any) {
    return service({
        method: 'get',
        url: controller+"/get",
        params: data,

    })
}

/*
修改
*/
function put(data: any) {
    return service({
        method: 'put',
        url: controller,
        data: data,
    })
}

/**
* 删除
* @param {*} data 
* @returns 
*/
function del(data: any) {
    return service({
        method: 'delete',
        url: controller,
        params: data,
    })
}

/*
添加
*/
function Add(data: any) {
    return service({
        method: 'post',
        url: controller,
        data: data,
    })
}

/*
状态为1
*/
function select(){
    return service({
        method:'get',
        url:controller+'/select',
    })

}

export default{
    query,
    get,
    put,
    select,
    del,
    Add

}